import redis

# 构造redis连接对象
redis_conn=redis.StrictRedis(
    host='localhost',
    port=6379,
    password='',
    decode_responses=True,
)

ret1=redis_conn.execute_command('keys *')
print(ret1)
print(type(ret1))
ret2=redis_conn.execute_command('set k1 v1')
print(ret2)
print(ret1)